﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;

namespace WumpusTest
{
    public struct Gamestate
    {
        public Connections connections;
        public Player player;
        public Wumpus wumpus;
        public List<Bat> bats;
    }


    public class GamestateSerializer
    {
        public GamestateSerializer(string rootSavePath)
        {
            this.RootSavePath = rootSavePath;
        }

        /// <summary>
        /// Saves the gamestate to a file.
        /// </summary>
        /// <param name="gameState">The gamestate to save.</param>
        public void Save(ref Gamestate gameState)
        {

        }

        /// <summary>
        /// Loads a given gamestate from a file.
        /// </summary>
        /// <returns>Returns the gamestate</returns>
        public Gamestate Load()
        {
            Gamestate gameState = new Gamestate();
            return gameState;
        }

        /// <summary>
        /// Checks if a gamestate had been previously saved.
        /// </summary>
        /// <returns>'true' if an older gamestate has already
        /// been saved to the filesystem.</returns>
        public bool DoesGamestateExist()
        {
            return false;
        }

        public string RootSavePath;
    }

    public class RandomGamestateGenerator
    {
        public Gamestate Generate(
            int minNumPlanets,
            int maxNumPlanets,
            int numBats,
            int numHoles
        )
        {
            Gamestate gamestate = new Gamestate();
            return gamestate;
        }
    }
}
